
#ifndef STATESHOPCOMMON_H
#define STATESHOPCOMMON_H

#include "GameState.h"
#include "Singleton.h"
#include "RenderableEntity.h"
#include "AnimatedEntity.h"
#include "TextEntity.h"
#include "TimeLineEffect.h"
#include "AchievementData.h"
#include "Container.h"

enum eShopState {SHOP_ENTER, SHOP_IDLE, SHOP_EXIT};
enum eShopPopUpState {SHOPPOPUP_NONE, SHOPPOPUP_BUY, SHOPPOPUP_NOCOINS, SHOPPOPUP_BUYCOINS};

class StateShopCommon : public GameState
{
protected:
    
    eShopState m_eState;
    eShopPopUpState m_ePopupState;
    
    RenderableEntity* m_oBg;
    RenderableEntity* m_oTitleBg;
    TextEntity* m_oTitleText;
    
    
    RenderableEntity* m_oCoinsIcon;
    TextEntity* m_oCoinsText;
    
    RenderableEntity* m_oBuyCoinsIcon;
    TextEntity* m_oBuyCoinsText;
    
    RenderableEntity* m_oBack;
    
    TimeLineEffect* m_oEnter;
    TimeLineEffect* m_oExit;
    
    GameState* m_oNextState;
    
public:
    
	StateShopCommon(){}
	~StateShopCommon(){}
    
    virtual void loadContent();
	virtual void unloadContent();
    
	virtual void enter();
	virtual void activated();
    virtual void update(float dt);
    virtual void updatePaused(float dt);
    virtual void render();
    virtual void exit();
    
    virtual void setBackState() = 0;
    
    static std::string getPrizeStr(int _iPrize);
};

#endif
